var table ,form ,laypage ,layer ,element ,laydate ,upload//时间组件
var map = new AMap.Map("container", {
	//center:[107.395792,40.73185],
	mapStyle: "amap://styles/d9a4d61b09a20fbf4f9ea53a37a7c11b",
	zoom: 18
});
$(function(){
    layui.use(['table','form','laypage','layer', 'element', 'laydate','upload','laytpl'], function(){
    	table = layui.table;
        form=layui.form;
        laypage = layui.laypage ;//分页
        layer = layui.layer ;//弹层
        element = layui.element; //元素操作
        laydate = layui.laydate; //时间组件 
        upload = layui.upload;
        laytpl = layui.laytpl;
        
        $.ajax({
	        url:'/res/page/equipment/date/header1.html',
	        type:'get',
	        async:false,
	        dataType : "html",
	        success:function(data){       	        	
	        	 var wrappedObj = $("<code></code>").append($(data));
	        	 var slehtn2=$(wrappedObj).find("#form_zzdata").html();
	        	 $("#headerDIV").append(slehtn2);
	        	 var sunhtml=$("#headerDIV").find(".ARRY").find("a");
	             for(var i=0;i<$(sunhtml).length;i++){
	     			var flgname=$(sunhtml).eq(i).attr("flg");
	     			if(flgname=='YD'){//选中用电
	     				var className=$(sunhtml).eq(i).attr("class");
	     				$(sunhtml).eq(i).attr('class',className+'_this');
	 
	     			}else{
	     				
	     			}
	     		}
	        	
	          
	        }
	    })
        statisticsDL()//实时电量 
        statisticsFH()//负荷曲线
        statisticsYFDL()//月发电量
        statisticsLSQX()//历史曲线
        statisticsDYDL()//电压，电流，功率
        statisticsBDZ();///*各变电站日度统计*/
        statisticsFZ()//电容器负载
        statisticsBJ()//电流报警
        statisticsBDZGL();///*各变电站功率统计*/
              
        //全屏
        var a = 0;
		$('#fullscreen').on('click', function () {
			a++;
			a % 2 == 1 ? enterfullscreen() : exitfullscreen();
		});
        
    });
});
//实时电量
function statisticsDL(){
	 var myChart = echarts.init(document.getElementById('prbottom_box1'));
	   var option = {
			   title: {
			        text: '实时电量(KW)',
			        padding:[20,0,0,10],
	                textAlign:'left',
		            textStyle:{
		                color:'#1bdcef',
		        　　　　                fontSize:12,
		            }
			    },
			   grid: {
					left: 50,
					right: 30,
					top:50,
					bottom: 30
				},
				tooltip : {
				         trigger: 'axis', //触发类型,'item'图形，散点图，饼图等无类目轴的图表中。 'axis'柱状图，折线图等。
				         triggerOn:"mousemove",  //提示框触发的条件
				         showContent:true,//是否显示提示框浮层
				         formatter: "{b} : 用电量{c}(KW)"
				},
			    xAxis: {
					type: 'category',
					boundaryGap: false,
					boundaryGap:true,
			        splitLine:{ //网格线
			          show:false,
			        },
			        axisLabel: { //x坐标文字样式
			        	color: "rgba(0,168,233,1)"
			        },
			        axisLine: {//X轴样式
						show:true,
						lineStyle: {
							color: 'rgba(0,168,233,1)'
						}
					},
					data:['8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00']
				},
				yAxis: {
					type: 'value',
					axisLine: {
						show:true,
						lineStyle: {
							color: 'rgba(0,168,233,1)'
						}
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(0,168,233,1)'
						}
					},
					axisLabel: {
						color: "rgba(0,168,233,1)"
					},
				},
			    series: [{
			        data: ["200","101","300","200","420","330","121","232"],
			        barWidth : 20,//柱图宽度
			        type: 'bar',
				    itemStyle: {
				    	normal: {
							color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
								offset: 0,
								color: "#2092f5" // 0% 处的颜色
							}, {
								offset: 0.3,
								color: "#2092f5" // 60% 处的颜色
							}, {
								offset: 1,
								color: "#09d8fd" // 100% 处的颜色
							}], false)
						}
	                }
			    }]                    
			};
	       myChart.setOption(option,true);
	       setInterval(function(){
	       	myChart.clear();
	       	myChart.setOption(option,true);
	       },7000);
}
//负荷曲线
function statisticsFH(){
	var myChart2 = echarts.init(document.getElementById('prbottom_box2'));
	var option = {
		    title: {
		        text: '负荷曲线',
		        padding:[20,0,0,10],
                textAlign:'left',
	            textStyle:{
	                color:'#1bdcef',
	        　　　　                fontSize:12,
	            }
		    },
		    tooltip: {
		        trigger: 'axis'
		    },
		    grid: {
    			left: 50,
    			bottom:40
    		},
		    legend: {
		        data: ['昨日负荷', '今日负荷'],
		        padding:[10,0,0,10],
		        textStyle:{
	                color:'#1bdcef',
	        　　　　                fontSize:10,
	            }
		    },
		    xAxis: {
		        type: 'category',
		        boundaryGap: false,
		        splitLine:{ //网格线
			          show:true,
			          lineStyle: {
							color: 'rgba(0,168,233,1)'
						}
			        },
			        axisLabel: { //x坐标文字样式
			        	color: "rgba(0,168,233,1)"
			        },
			        axisLine: {//X轴样式
						show:true,
						lineStyle: {
							color: 'rgba(0,168,233,1)'
						}
					},
		        data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
		    },
		    yAxis: {
		        type: 'value',
		        axisLine: {
					show:true,
					lineStyle: {
						color: 'rgba(0,168,233,1)'
					}
				},
				splitLine: {
					lineStyle: {
						color: 'rgba(0,168,233,1)'
					}
				},
				axisLabel: {
					color: "rgba(0,168,233,1)"
				},
		        axisLabel: {
		           // formatter: '{value} °C'
		        }
		    },
		    series: [
		        {
		            name: '昨日负荷',
		            type: 'line',
		            data: [100, 111, 132, 113, 125, 122, 97],
		            lineStyle: {//折线线条颜色
                        color: '#ffcc00'
                    },
                    itemStyle : {//折线折点颜色
                        normal : {
                            color:'#ffcc00'
                        }
                    }
		        },
		        {
		            name: '今日负荷',
		            type: 'line',
		            data: [90, 57, 45, 67, 66, 70, 71],
		            lineStyle: {//折线线条颜色
                        color: '#00ffff'
                    },
                    itemStyle : {//折线折点颜色
                        normal : {
                            color:'#00ffff'
                        }
                    }
		            
		        }
		    ]
		};
	 myChart2.setOption(option,true);
     setInterval(function(){
     	myChart2.clear();
     	myChart2.setOption(option,true);
     },6000);
}
//月发电量
function statisticsYFDL(){
	var myChart3 = echarts.init(document.getElementById('prbottom_box3'));
    var option = {
    		 title: {
 		        text: '月发电量',
 		        padding:[20,0,0,10],
                textAlign:'left',
 	            textStyle:{
 	                color:'#1bdcef',
 	        　　　　                fontSize:12,
 	            }
 		    },
    	    tooltip: {
    	        trigger: 'axis',
    	        axisPointer: {
    	            type: 'cross',
    	            crossStyle: {
    	                color: '#999'
    	            }
    	        }
    	    },
    	    grid: {
    			left: 50,
    			bottom:40
    		},
    	    legend: {
    	    	 padding:[10,0,0,0],
 		         textStyle:{
 	                color:'#1bdcef',
 	        　　　　                fontSize:10,
 	            },
    	        data: ['变电站1', '变电站2', '变电站3', '变电站4']
    	    },
    	    xAxis: {
    	            type: 'category',
					boundaryGap: false,
					boundaryGap:true,
			        splitLine:{ //网格线
			          show:false,
			        },
			        axisLabel: { //x坐标文字样式
			        	color: "rgba(0,168,233,1)"
			        },
			        axisLine: {//X轴样式
						show:true,
						lineStyle: {
							color: 'rgba(0,168,233,1)'
						}
					},
    	            data: ['1月', '2月', '3月', '4月', '5月', '6月'],
    	     },
    	    yAxis:{
				type: 'value',
				axisLine: {
					show:true,
					lineStyle: {
						color: 'rgba(0,168,233,1)'
					}
				},
				splitLine: {
					lineStyle: {
						color: 'rgba(0,168,233,1)'
					}
				},
				axisLabel: {
					color: "rgba(0,168,233,1)"
				},
    	    },
    	    series: [
    	        {
    	            name: '变电站1',
    	            type: 'bar',
    	            data: [2133, 1290, 2452, 3125, 1102, 2102]
    	        },
    	        {
    	            name: '变电站2',
    	            type: 'bar',
    	            data: [1330, 1390, 1452, 2125, 2112, 3322]
    	        },
    	        {
    	            name: '变电站3',
    	            type: 'bar',
    	            data: [1233, 1610, 2452, 3125, 1102, 2102]
    	        },
    	        {
    	            name: '变电站4',
    	            type: 'bar',
    	            data: [2033, 1290, 1452, 1325, 2012, 2012]
    	        },
    	    ]
    	};
	myChart3.setOption(option,true);
    setInterval(function(){
    	myChart3.clear();
    	myChart3.setOption(option,true);
    },5000);
}
//历史曲线
function statisticsLSQX(){
	var myChart4 = echarts.init(document.getElementById('prbottom_box4'));
	var option = {
		    title: {
		        text: '历史曲线',
		        padding:[20,0,0,10],
                textAlign:'left',
	            textStyle:{
	                color:'#1bdcef',
	        　　　　                fontSize:12,
	            }
		    },
		    tooltip: {
		        trigger: 'axis'
		    },
		    grid: {
    			left: 50,
    			bottom:40
    		},
		    /*legend: {
		        data: ['昨日负荷', '今日负荷'],
		        padding:[10,0,0,10],
		        textStyle:{
	                color:'#1bdcef',
	        　　　　                fontSize:10,
	            }
		    },*/
		    xAxis: {
		        type: 'category',
		        boundaryGap: false,
		        splitLine:{ //网格线
			          show:true,
			          lineStyle: {
							color: 'rgba(0,168,233,1)'
						}
			        },
			        axisLabel: { //x坐标文字样式
			        	color: "rgba(0,168,233,1)"
			        },
			        axisLine: {//X轴样式
						show:true,
						lineStyle: {
							color: 'rgba(0,168,233,1)'
						}
					},
				 data:['8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00']
		    },
		    yAxis: {
		        type: 'value',
		        axisLine: {
					show:true,
					lineStyle: {
						color: 'rgba(0,168,233,1)'
					}
				},
				splitLine: {
					lineStyle: {
						color: 'rgba(0,168,233,1)'
					}
				},
				axisLabel: {
					color: "rgba(0,168,233,1)"
				},
		        axisLabel: {
		           // formatter: '{value} °C'
		        }
		    },
		    series: [
		        {
		            name: '昨日负荷',
		            type: 'line',
		            data: [100, 111, 132, 113, 125, 122, 97,100, 111, 132, 113, 125, 122, 87,121],
		            lineStyle: {//折线线条颜色
                        color: '#ffcc00'
                    },
                    itemStyle : {//折线折点颜色
                        normal : {
                            color:'#ffcc00'
                        }
                    }
		        },
		        {
		            name: '今日负荷',
		            type: 'line',
		            data: [110, 157, 145, 97, 66, 70, 71,110, 131, 102, 103, 165, 123, 97,110],
		            lineStyle: {//折线线条颜色
                        color: '#00ffff'
                    },
                    itemStyle : {//折线折点颜色
                        normal : {
                            color:'#00ffff'
                        }
                    }
		            
		        }
		    ]
		};
	 myChart4.setOption(option,true);
     setInterval(function(){
     	myChart4.clear();
     	myChart4.setOption(option,true);
     },3500);
}
function statisticsDYDL(){
	var myChart5 = echarts.init(document.getElementById('prbottom_box5'));
	var option = {
		    title: {
		        text: '电压、电流、功率',
		        padding:[20,0,0,10],
                textAlign:'left',
	            textStyle:{
	                color:'#1bdcef',
	        　　　　                fontSize:12,
	            }
		    },
		    tooltip: {
		        trigger: 'axis'
		    },
		    grid: {
    			left: 50,
    			bottom:40
    		},
		    /*legend: {
		        data: ['昨日负荷', '今日负荷'],
		        padding:[10,0,0,10],
		        textStyle:{
	                color:'#1bdcef',
	        　　　　                fontSize:10,
	            }
		    },*/
		    xAxis: {
		        type: 'category',
		        boundaryGap: false,
		        splitLine:{ //网格线
			          show:true,
			          lineStyle: {
							color: 'rgba(0,168,233,1)'
						}
			        },
			        axisLabel: { //x坐标文字样式
			        	color: "rgba(0,168,233,1)"
			        },
			        axisLine: {//X轴样式
						show:true,
						lineStyle: {
							color: 'rgba(0,168,233,1)'
						}
					},
				 data:['8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00']
		    },
		    yAxis: {
		        type: 'value',
		        axisLine: {
					show:true,
					lineStyle: {
						color: 'rgba(0,168,233,1)'
					}
				},
				splitLine: {
					lineStyle: {
						color: 'rgba(0,168,233,1)'
					}
				},
				axisLabel: {
					color: "rgba(0,168,233,1)"
				},
		        axisLabel: {
		           // formatter: '{value} °C'
		        }
		    },
		    series: [
		        {
		            name: '第一天',
		            type: 'line',
		            data: [111, 121, 122, 213, 150, 135, 197,140, 121, 142, 153, 125, 120, 107,101],
		            lineStyle: {//折线线条颜色
                        color: '#ffcc00'
                    },
                    itemStyle : {//折线折点颜色
                        normal : {
                            color:'#ffcc00'
                        }
                    }
		        },
		        {
		            name: '第二天',
		            type: 'line',
		            data: [110, 157, 145, 97, 66, 70, 71,110, 131, 102, 103, 165, 123, 97,110],
		            lineStyle: {//折线线条颜色
                        color: '#00ffff'
                    },
                    itemStyle : {//折线折点颜色
                        normal : {
                            color:'#00ffff'
                        }
                    }
		            
		        },
		        {
		            name: '第三天',
		            type: 'line',
		            data: [66, 70, 71,110, 131, 102, 70,111, 122, 213, 150, 135, 197,140, 121],
		            lineStyle: {//折线线条颜色
                        color: '#00fe01'
                    },
                    itemStyle : {//折线折点颜色
                        normal : {
                            color:'#00fe01'
                        }
                    }
		            
		        }
		    ]
		};
	 myChart5.setOption(option,true);
     setInterval(function(){
     	myChart5.clear();
     	myChart5.setOption(option,true);
     },4300);
}
//各变电站日度统计	 
function statisticsBDZ(){
	var myChart6 = echarts.init(document.getElementById('prbottom_box6'));
	// 指定图表的配置项和数据
	var option = {
		 title: {
		        text: '各变电站日度统计',
		        padding:[20,0,0,10],
                textAlign:'left',
	            textStyle:{
	                color:'#1bdcef',
	        　　　　                fontSize:12,
	            }
		},
		tooltip : {  
            trigger: 'item',  
            formatter: "{b} : {c}%"  
        },
	    color: ['#ee6fa2', '#facc9b', '#94d0ae', '#5a7cde'],		
	    series: [
	    	{
	            name: '',
	            type: 'pie',
	            selectedMode: 'single',
	            radius: [0, '18%'],
	            center: ['50%', '51%'],
	            label: {
	                position: 'inner',
	                normal: {
			        	color:"#ee6666"
		            },
	            },
	            tooltip : {  
	            	show: false,
		        },
	            labelLine: {
	                show: false,
	               
	            },
	            data: [
	                {value:18, name: ''},
	            ]
	      },
	      {
	        name: '',
	        type: 'pie',
	        radius: ['35%', '65%'], // 半径
	        center: ['50%', '51%'], // 位置
	        label: {
	            normal: {
	            	textStyle:{
		        		color:'#00ffff'
		        	},
		        	show: true,
	        		formatter: "{b} : {c}%"
	            },
	        },
	        data: [{
	                value: 44,
	                name: '变电站1'
	            },
	            {
	                value: 48,
	                name: '变电站2'
	            },
	            {
	                value: 51,
	                name: '变电站3'
	            },
	            {
	                value: 36,
	                name: '变电站4'
	            }
	        ],
	        itemStyle: {
	            emphasis: {
	                shadowBlur: 10,
	                shadowOffsetX: 0,
	                shadowColor: 'rgba(0, 0, 0, 0.5)'
	            }
	        }
	    }]
	};
	// 使用刚指定的配置项和数据显示图表。
	myChart6.setOption(option,true);
    setInterval(function(){
    	myChart6.clear();
    	myChart6.setOption(option,true);
    },5000);
}
//电容器负载
function statisticsBJ(){
	 var myChart7 = echarts.init(document.getElementById('prbottom_box7'));
	   var option = {
			   title: {
			        text: '电容器负载(KW)',
			        padding:[20,0,0,10],
	                textAlign:'left',
		            textStyle:{
		                color:'#1bdcef',
		        　　　　                fontSize:12,
		            }
			    },
			   grid: {
					left: 50,
					right: 30,
					top:50,
					bottom: 30
				},
				tooltip : {
				         trigger: 'axis', //触发类型,'item'图形，散点图，饼图等无类目轴的图表中。 'axis'柱状图，折线图等。
				         triggerOn:"mousemove",  //提示框触发的条件
				         showContent:true,//是否显示提示框浮层
				         formatter: "{b} : 用电量{c}(KW)"
				},
			    xAxis: {
					type: 'category',
					boundaryGap: false,
					boundaryGap:true,
			        splitLine:{ //网格线
			          show:false,
			        },
			        axisLabel: { //x坐标文字样式
			        	color: "rgba(0,168,233,1)"
			        },
			        axisLine: {//X轴样式
						show:true,
						lineStyle: {
							color: 'rgba(0,168,233,1)'
						}
					},
					data:['8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00']
				},
				yAxis: {
					type: 'value',
					axisLine: {
						show:true,
						lineStyle: {
							color: 'rgba(0,168,233,1)'
						}
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(0,168,233,1)'
						}
					},
					axisLabel: {
						color: "rgba(0,168,233,1)"
					},
				},
			    series: [{
			        data: ["1120","131","2460","2660","240","430","101","232"],
			        barWidth : 20,//柱图宽度
			        type: 'bar',
				    itemStyle: {
				    	normal: {
							color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
								offset: 0,
								color: "#2092f5" // 0% 处的颜色
							}, {
								offset: 0.3,
								color: "#2092f5" // 60% 处的颜色
							}, {
								offset: 1,
								color: "#09d8fd" // 100% 处的颜色
							}], false)
						}
	                }
			    }]                    
			};
	       myChart7.setOption(option,true);
	       setInterval(function(){
	       	myChart7.clear();
	       	myChart7.setOption(option,true);
	       },5500);
}
//电流报警
function statisticsFZ(){
	var myChart8 = echarts.init(document.getElementById('prbottom_box8'));
	var option = {
		    title: {
		        text: '电流报警限制',
		        padding:[20,0,0,10],
                textAlign:'left',
	            textStyle:{
	                color:'#1bdcef',
	        　　　　                fontSize:12,
	            }
		    },
		    tooltip: {
		        trigger: 'axis'
		    },
		    grid: {
    			left: 50,
    			bottom:40
    		},
		    legend: {
		        data: ['昨日负荷', '今日负荷'],
		        padding:[10,0,0,10],
		        textStyle:{
	                color:'#1bdcef',
	        　　　　                fontSize:10,
	            }
		    },
		    xAxis: {
		        type: 'category',
		        boundaryGap: false,
		        splitLine:{ //网格线
			          show:true,
			          lineStyle: {
							color: 'rgba(0,168,233,1)'
						}
			        },
			        axisLabel: { //x坐标文字样式
			        	color: "rgba(0,168,233,1)"
			        },
			        axisLine: {//X轴样式
						show:true,
						lineStyle: {
							color: 'rgba(0,168,233,1)'
						}
					},
		        data:['8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00']
		    },
		    yAxis: {
		        type: 'value',
		        axisLine: {
					show:true,
					lineStyle: {
						color: 'rgba(0,168,233,1)'
					}
				},
				splitLine: {
					lineStyle: {
						color: 'rgba(0,168,233,1)'
					}
				},
				axisLabel: {
					color: "rgba(0,168,233,1)"
				},
		        axisLabel: {
		           // formatter: '{value} °C'
		        }
		    },
		    series: [
		    	 {
			            name: '最高',
			            type: 'line',
			            data: [111, 121, 122, 213, 150, 135, 197,140, 121, 142, 153, 125, 120, 107,101],
			            lineStyle: {//折线线条颜色
	                        color: '#ffcc00'
	                    },
	                    itemStyle : {//折线折点颜色
	                        normal : {
	                            color:'#ffcc00'
	                        }
	                    }
			        },
			        {
			            name: '最低',
			            type: 'line',
			            data: [50, 67, 45, 7, 66, 20, 11,10, 11, 12, 13, 15, 23, 67,10],
			            lineStyle: {//折线线条颜色
	                        color: '#00ffff'
	                    },
	                    itemStyle : {//折线折点颜色
	                        normal : {
	                            color:'#00ffff'
	                        }
	                    }
			            
			        },
		    ]
		};
	 myChart8.setOption(option,true);
     setInterval(function(){
     	myChart8.clear();
     	myChart8.setOption(option,true);
     },6300);
}
///*各变电站功率统计*/
function statisticsBDZGL(){
	var myChart9 = echarts.init(document.getElementById('prbottom_box9'));
	var option = {
		   title: {
		        text: '变电站功率统计',
		        padding:[20,0,0,10],
                textAlign:'left',
	            textStyle:{
	                color:'#1bdcef',
	        　　　　                fontSize:12,
	            }
		    },
		    tooltip : {  
	            trigger: 'item',  
	            formatter: "{b} : {c}%"  
	        },
		    series: [
		        {
		            name: '访问来源',
		            type: 'pie',
		            radius: '50%',
		            label: {
			            normal: {
			            	textStyle:{
				        		color:'#00ffff'
				        	},
				        	show: true,
			        		formatter: "{c}%"
			            },
			        },
		            data: [
		                {value: 96, name: '变电站1'},
		                {value: 85, name: '变电站2'},
		                {value: 92, name: '变电站3'},
		                {value: 78, name: '变电站4'},
		            ],
		            emphasis: {
		                itemStyle: {
		                    shadowBlur: 10,
		                    shadowOffsetX: 0,
		                    shadowColor: 'rgba(0, 0, 0, 0.5)'
		                }
		            }
		        }
		    ]
		};
	myChart9.setOption(option,true);
    setInterval(function(){
    	myChart9.clear();
    	myChart9.setOption(option,true);
    },10000);
};
//控制全屏
function enterfullscreen() { //进入全屏
	$("#fullscreen").html("<i class='layui-icon'>&#xe758;</i>退出全屏");
	var docElm = document.documentElement;
	var elm = document.getElementById('Main');
	//W3C
	if (docElm.requestFullscreen) {
		docElm.requestFullscreen();
	}
	//FireFox
	else if (docElm.mozRequestFullScreen) {
		docElm.mozRequestFullScreen();
	}
	//Chrome等
	else if (docElm.webkitRequestFullScreen) {
		docElm.webkitRequestFullScreen();
	}
	//IE11
	else if (elm.msRequestFullscreen) {
		elm.msRequestFullscreen();
	}
}

function exitfullscreen() { //退出全屏
	$("#fullscreen").html("切换全屏");
	if (document.exitFullscreen) {
		document.exitFullscreen();
	} else if (document.mozCancelFullScreen) {
		document.mozCancelFullScreen();
	} else if (document.webkitCancelFullScreen) {
		document.webkitCancelFullScreen();
	} else if (document.msExitFullscreen) {
		document.msExitFullscreen();
	}
}